home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 53 / PC Actual CD 53.iso / Demos / Fax / Faxgate / GDR / GDRRules / AzurSample.rlg < prev    next >
Encoding:
Text File  |  2000-06-09  |  6.7 KB  |  271 lines

  1. //{{ GDR_DOCTYPE
  2.     // NOTE - the GDR will add and remove lines here.
  3.     //    DO NOT EDIT what you see in these blocks of generated code!
  4. // { GDR_DOCTYPE_VERSION
  5. // VERSION=1.00
  6. // } GDR_DOCTYPE_VERSION
  7. // { GDR_DOCTYPE_HEAD
  8. DataStruct
  9. {
  10. info:
  11.     documentType is "AzurSample";
  12.     tabStop is 8;
  13.  
  14. input:
  15. // } GDR_DOCTYPE_HEAD
  16. // { GDR_DOCTYPE_RECOGNITION
  17.         area0_0_0_67_2 is "contains""************************       AZUR        ************************\n************************FLIGHT CONFIRMATION************************";
  18.     recognitionByContents is true;
  19. // } GDR_DOCTYPE_RECOGNITION
  20. // { GDR_DOCTYPE_PAGEBREAK
  21.     pageBreakOnString_value is "\f";
  22.         pageBreakOnString_includeLine is true;
  23. // } GDR_DOCTYPE_PAGEBREAK
  24. // { GDR_DOCTYPE_DOCBREAK
  25.     docBreakOnString_value is "  AZUR  ";
  26.         docBreakOnString_excludeLine is true;
  27. // } GDR_DOCTYPE_DOCBREAK
  28. // { GDR_DOCTYPE_BOTTOM
  29.  
  30. }doctypeAzurSample;
  31. // } GDR_DOCTYPE_BOTTOM
  32. // { GDR_DOCTYPE_ONLYDOC
  33. if ( ___serial___onlyDocType___ ) return;
  34. // } GDR_DOCTYPE_ONLYDOC
  35. //}} GDR_DOCTYPE
  36. //{{ GDR_INFO
  37.     // NOTE - the GDR will add and remove lines here.
  38.     //    DO NOT EDIT what you see in these blocks of generated code!
  39. // { GDR_INFO_TEXT
  40. // file="C:\\Program Files\\Esker\\Faxgate\\Adminmmc\\GDRTest\\FG701_Azur\\Azur0426.txt"
  41. // size=86
  42. // ************************       AZUR        ************************
  43. // ************************FLIGHT CONFIRMATION************************
  44. // Clients: Traveltour
  45. // Address: 20 rue Carnot - 69003 LYON
  46. // Tel: 330
  47. // Fax: 331
  48. // 
  49. // Reservation made on 4/26/2000
  50. // Reservation number: E3649
  51. // Agent ID: cblond/cblond@azur.com
  52. // 
  53. // Please find here the confimartion for the following flight(s):
  54. // 
  55. // FLIGHT: AZ 1541
  56. // Seats: 4
  57. // Class: business
  58. // Departure airport: Lyon
  59. // Local departure date/time: 4/29/2000 10.15 AM    
  60. // Destination airport: London, Heathrow
  61. // Destination arrival date/time: 4/29/2000 10.25 AM
  62. // 
  63. // FLIGHT: AZ 1478
  64. // Seats: 4
  65. // Class: business
  66. // Departure airport:London, Heathrow    
  67. // Local departure date/time: 5/1/2000 6.30 PM    
  68. // Destination airport: Lyon
  69. // Destination arrival date/time: 5/1/2000 7.40 PM
  70. // 
  71. // ************************       AZUR        ************************
  72. // ************************FLIGHT CONFIRMATION************************
  73. // Clients: Traveltour
  74. // Address: 20 rue Carnot - 69003 LYON
  75. // Tel: 440
  76. // Fax: 441
  77. // 
  78. // Reservation made on 4/26/2000
  79. // Reservation number: E2348
  80. // Agent ID: emay/emay@azur.com
  81. // 
  82. // Please find here the confimartion for the following flight(s):
  83. // 
  84. // FLIGHT: AZ 6539
  85. // Seats: 2
  86. // Class: tourist
  87. // Departure airport:    Paris, De Gaulle
  88. // Local departure date/time: 6/16/2000 8.40 AM    
  89. // Destination airport: Montreal, Dorval
  90. // Destination arrival date/time: 6/16/2000 10.40 AM
  91. // 
  92. // FLIGHT: AZ 7235
  93. // Seats: 2
  94. // Class: tourist
  95. // Departure airport:Montreal, Dorval    
  96. // Local departure date/time: 7/5/2000 9.20 PM    
  97. // Destination airport: Paris, De Gaulle
  98. // Destination arrival date/time: 8/5/2000 7.20 AM
  99. // 
  100. // ************************       AZUR        ************************
  101. // ************************FLIGHT CONFIRMATION************************
  102. // Clients: Smith
  103. // Address: 3 rue des Jolys - 69500 BRON
  104. // Tel: 550
  105. // Fax: 551
  106. // 
  107. // Reservation made on 4/26/2000
  108. // Reservation number: I2349
  109. // Agent ID: emay/emay@azur.com
  110. // 
  111. // Please find here the confimartion for the following flight(s):
  112. // 
  113. // FLIGHT: AZ 2765
  114. // Seats: 2
  115. // Class: tourist
  116. // Departure airport:    Paris, De Gaulle
  117. // Local departure date/time: 7/13/2000 12.00 PM    
  118. // Destination airport: New York, JFK
  119. // Destination arrival date/time: 7/13/2000 13.15 PM
  120. // 
  121. // FLIGHT: AZ 2965
  122. // Seats: 2
  123. // Class: tourist
  124. // Departure airport:New York, JFK    
  125. // Local departure date/time: 7/16/2000 8.30 PM    
  126. // Destination airport: Paris, De Gaulle
  127. // Destination arrival date/time: 7/17/2000 6.30 AM
  128. // } GDR_INFO_TEXT
  129. //}} GDR_INFO
  130. //{{ GDR_RULE
  131.     // NOTE - the GDR will add and remove lines here.
  132.     //    DO NOT EDIT what you see in these blocks of generated code!
  133. // { GDR_RULE_VERSION
  134. // VERSION=1.00
  135. // } GDR_RULE_VERSION
  136. // { GDR_RULE_INCLUDE
  137. inline ".\\common.ilg";
  138. // } GDR_RULE_INCLUDE
  139. // { GDR_RULE_VARIABLE
  140. String RecipientType;
  141. String RecipientAddress;
  142. String FaxNumber;
  143.  
  144. void SetDefaultValueIfNeeded()
  145. {
  146.     if (RecipientType=="") RecipientType="SM";
  147.     if (RecipientAddress=="") ;
  148.     if (FaxNumber=="") ;
  149. }
  150. // } GDR_RULE_VARIABLE
  151. //}} GDR_RULE
  152. //{{ GDR_AREA
  153.     // NOTE - the GDR will add and remove lines here.
  154.     //    DO NOT EDIT what you see in these blocks of generated code!
  155. // { GDR_AREA_VERSION
  156. // VERSION=1.00
  157. // } GDR_AREA_VERSION
  158. // { GDR_AREA_HEAD
  159. void GetArea0()
  160. {
  161.     if ( FaxNumber != "" ) return;
  162. // } GDR_AREA_HEAD
  163. // { GDR_AREA_AREA
  164.     String stream=getArea(0,5,5,3,1).getString();
  165.  
  166. // } GDR_AREA_AREA
  167. // { GDR_AREA_EXTRACT
  168.  
  169. // } GDR_AREA_EXTRACT
  170. // { GDR_AREA_CASE
  171.  
  172. // } GDR_AREA_CASE
  173. // { GDR_AREA_STRIP
  174.     stream.trim(BOTH);
  175. // } GDR_AREA_STRIP
  176. // { GDR_AREA_INCLUDE
  177.  
  178. // } GDR_AREA_INCLUDE
  179. // { GDR_AREA_EXCLUDE
  180.  
  181. // } GDR_AREA_EXCLUDE
  182. // { GDR_AREA_CONDITION
  183.     if (true)
  184.     {
  185. // } GDR_AREA_CONDITION
  186. // { GDR_AREA_ASSIGN
  187.         FaxNumber=stream;
  188. // } GDR_AREA_ASSIGN
  189. // { GDR_AREA_BOTTOM
  190.     }
  191. }
  192. // } GDR_AREA_BOTTOM
  193. //}} GDR_AREA
  194. //{{ GDR_AREA
  195.     // NOTE - the GDR will add and remove lines here.
  196.     //    DO NOT EDIT what you see in these blocks of generated code!
  197. // { GDR_AREA_VERSION
  198. // VERSION=1.00
  199. // } GDR_AREA_VERSION
  200. // { GDR_AREA_HEAD
  201. void GetArea1()
  202. {
  203.     if ( RecipientAddress != "" ) return;
  204. // } GDR_AREA_HEAD
  205. // { GDR_AREA_AREA
  206.     String stream=getArea(0,0,9,54,1).getString();
  207.  
  208. // } GDR_AREA_AREA
  209. // { GDR_AREA_EXTRACT
  210.     {
  211.         Integer iStart = stream.indexOf("/",true,true);
  212.         if ( iStart < 0 ) iStart = stream.length();
  213.         Integer iFrom = iStart;
  214.         Integer iEnd = stream.length();
  215.         stream = stream.substring(iStart,iEnd-iStart);
  216.     }
  217. // } GDR_AREA_EXTRACT
  218. // { GDR_AREA_CASE
  219.  
  220. // } GDR_AREA_CASE
  221. // { GDR_AREA_STRIP
  222.     stream.trim(BOTH);
  223. // } GDR_AREA_STRIP
  224. // { GDR_AREA_INCLUDE
  225.  
  226. // } GDR_AREA_INCLUDE
  227. // { GDR_AREA_EXCLUDE
  228.  
  229. // } GDR_AREA_EXCLUDE
  230. // { GDR_AREA_CONDITION
  231.     if (true)
  232.     {
  233. // } GDR_AREA_CONDITION
  234. // { GDR_AREA_ASSIGN
  235.         RecipientAddress=stream;
  236. // } GDR_AREA_ASSIGN
  237. // { GDR_AREA_BOTTOM
  238.     }
  239. }
  240. // } GDR_AREA_BOTTOM
  241. //}} GDR_AREA
  242. //{{ GDR_RULE
  243.     // NOTE - the GDR will add and remove lines here.
  244.     //    DO NOT EDIT what you see in these blocks of generated code!
  245. // { GDR_RULE_VALID_1
  246. void PostAreaValidation()
  247. {
  248. }
  249. // } GDR_RULE_VALID_1
  250. //}} GDR_RULE
  251. //{{ GDR_RULE
  252.     // NOTE - the GDR will add and remove lines here.
  253.     //    DO NOT EDIT what you see in these blocks of generated code!
  254. // { GDR_RULE_VALID_2
  255. void PostRequestValidation()
  256. {
  257. }
  258. // } GDR_RULE_VALID_2
  259. //}} GDR_RULE
  260. //{{ GDR_RULE
  261.     // NOTE - the GDR will add and remove lines here.
  262.     //    DO NOT EDIT what you see in these blocks of generated code!
  263. // { GDR_RULE_MAIN
  264. GetArea0();
  265. GetArea1();
  266. PostAreaValidation();
  267. SetDefaultValueIfNeeded();
  268. PostRequestValidation();
  269. // } GDR_RULE_MAIN
  270. //}} GDR_RULE
  271.